﻿using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace XinGuanERP.Models.Po.business;

public class InStock : PrivateCommonEntity<string>, IEntityTypeBuilder<InStock>
{
    public string? Type { get; set; }
    public string? ProductId { get; set; }
    public string? SuppilerID { get; set; }
    public long? ProductInStock { get; set; }

    public void Configure(EntityTypeBuilder<InStock> entityBuilder, DbContext dbContext, Type dbContextLocator)
    {
        entityBuilder.ToTable("biz_in_stock");
        entityBuilder.HasKey(t => t.Id);
        entityBuilder.Property(t => t.Id).HasColumnName("id");
        entityBuilder.Property(t => t.CreateTime).HasColumnName("CREATETIME");
        entityBuilder.Property(t => t.UpdateTime).HasColumnName("UPDATETIME");
        entityBuilder.Property(t => t.CreateUserId).HasColumnName("CREATEUSERID");
        entityBuilder.Property(t => t.CreateUserName).HasColumnName("CREATEUSERNAME");
        entityBuilder.Property(t => t.UpdateUserId).HasColumnName("UPDATEUSERID");
        entityBuilder.Property(t => t.UpdateUserName).HasColumnName("UPDATEUSERNAME");
        entityBuilder.Property(t => t.Type).HasColumnName("type");
        entityBuilder.Property(t => t.ProductId).HasColumnName("product_id");
        entityBuilder.Property(t => t.SuppilerID).HasColumnName("suppiler_id");
        entityBuilder.Property(t => t.ProductInStock).HasColumnName("product_in_stock");
    }
    
}